import ajax from './index'



export function app_menu_list(condition) {
    if(!condition) {
        condition = {
            page: 1,
            num: 100
        }
    }
    return ajax({
        url: "/backend/app_menu/list",
        method: "get",
        params: condition
    });
}
export function app_menu_all(condition) {
    return ajax({
        url: "/backend/app_menu/listAll",
        method: "get",
        params: condition
    });
}

export function app_menu_add(param) {
    return ajax({
        url: "/backend/app_menu/create",
        method: "post",
        data: param
    });
}

export function app_menu_edit(id, param) {
    return ajax({
        url: "/backend/app_menu/update/" + id,
        method: "post",
        data: param
    });
}

export function app_menu_del(id) {
    return ajax({
        url: "/backend/app_menu/delete?ids=" + id,
        method: "post"
    });
}

export function app_menu_detail(id) {
    return ajax({
        url: "/backend/app_menu/detail/" + id,
        method: "get"
    });
}